{{#with component.measures}}
  <span class="nowrap">
    {{#any test_success_density test_failures test_errors test_execution_time}}
      <div class="component-viewer-header-expanded-bar-section">
        <div class="component-viewer-header-expanded-bar-section-title">
          {{t 'component_viewer.measure_section.tests'}}
        </div>
        <ul class="component-viewer-header-expanded-bar-section-list">
          {{#if test_success_density}}
            <li><span class="item" data-metric="test_success_density">
              <span class="label">{{t 'metric.test_success_density.short_name'}}</span>
              <span class="number">{{test_success_density}}</span>
            </span></li>
          {{/if}}
          {{#if skipped_tests}}
            <li><span class="item" data-metric="skipped_tests">
              <span class="label">{{t 'metric.skipped_tests.short_name'}}</span>
              <span class="number">{{skipped_tests}}</span>
            </span></li>
          {{/if}}
          {{#if test_failures}}
            <li><span class="item" data-metric="test_failures">
              <span class="label">{{t 'metric.test_failures.short_name'}}</span>
              <span class="number">{{test_failures}}</span>
            </span></li>
          {{/if}}
          {{#if test_errors}}
            <li><span class="item" data-metric="test_errors">
              <span class="label">{{t 'metric.test_errors.short_name'}}</span>
              <span class="number">{{test_errors}}</span>
            </span></li>
          {{/if}}
          {{#if test_execution_time}}
            <li><span class="item" data-metric="test_execution_time">
              <span class="label">{{t 'metric.test_execution_time.short_name'}}</span>
              <span class="number">{{test_execution_time}}</span>
            </span></li>
          {{/if}}
        </ul>
      </div>
    {{/any}}
  </span>
{{/with}}

<div class="component-viewer-header-expanded-bar-section large">
  <div class="component-viewer-header-expanded-bar-section-title justify">
    <span class="ib">
      {{t 'component_viewer.measure_section.test_cases'}}
      {{t 'component_viewer.tests.ordered_by'}}
      <a class="js-sort-tests-name">{{t 'component_viewer.tests.test_name'}}</a>
      /
      <a class="js-sort-tests-duration">{{t 'component_viewer.tests.duration'}}</a>
    </span>
    {{#if hasCoveragePerTestData}}
      <span class="ib">{{t 'component_viewer.covered_lines'}}</span>
    {{/if}}
  </div>
  <ul class="component-viewer-header-expanded-bar-section-list">
    {{#each tests}}
      {{#eq status 'SKIPPED'}}
        <li><span class="item" title="{{name}}" data-status="{{status}}">
        <span class="label">{{testStatusIcon status}}
          <span class="duration subtitle"></span>
          {{name}}</span>
        </span></li>
      {{else}}
        {{#ifTestData this}}
          <li><a class="item js-unit-test" data-name="{{name}}" data-status="{{status}}" title="{{name}}">
          <span class="label">{{testStatusIcon status}}
            <span class="duration subtitle">{{durationInMs}}ms</span>
            {{name}}</span>
            {{#if coveredLines}}
              <span class="number">{{coveredLines}}</span>
            {{/if}}
            <i class="icon-chevron-right"></i>
          </a></li>
        {{else}}
          <li><span class="item" data-name="{{name}}" data-status="{{status}}" title="{{name}}">
          <span class="label">{{testStatusIcon status}}
            <span class="duration subtitle">{{durationInMs}}ms</span> {{name}}</span>
          </span></li>
        {{/ifTestData}}
      {{/eq}}
    {{/each}}
  </ul>
</div>
